// 
import OpenAI from "openai";
const openai = new OpenAI({
  baseURL: 'https://api.deepseek.com',
  apiKey: 'sk-714fe3258a234a02a69e3b5c435397da'
});

export default (deep, json = false) => {
  return openai.chat.completions.create({
    messages: deep,
    model: 'deepseek-chat',
    temperature: 1,
    top_p: 1,
    response_format: { "type": json ? "json_object" : "text" }
  }).then(res => {
    return res.choices[0].message.content;
  })
}
